package cn.lsq.org.domain;


import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.ArrayList;
import java.util.List;

public class Department {

  private Long id;
  private String sn;
  private String name;
  private String dirPath;
  private Integer state;
  private Long manager_id;
  private Long parent_id;
  private Employee manager;
  private Department parent;
  //用于封装当前部门的子部门
  //部门树最后一级没有数据就不显示
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
  private List<Department> children = new ArrayList<>();

  public List<Department> getChildren() {
    return children;
  }

  public void setChildren(List<Department> children) {
    this.children = children;
  }

  public Employee getManager() {
    return manager;
  }

  public void setManager(Employee manager) {
    this.manager = manager;
  }

  public Department getParent() {
    return parent;
  }

  public void setParent(Department parent) {
    this.parent = parent;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getSn() {
    return sn;
  }

  public void setSn(String sn) {
    this.sn = sn;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getDirPath() {
    return dirPath;
  }

  public void setDirPath(String dirPath) {
    this.dirPath = dirPath;
  }

  public Integer getState() {
    return state;
  }

  public void setState(Integer state) {
    this.state = state;
  }

  public Long getManager_id() {
    return manager_id;
  }

  public void setManager_id(Long manager_id) {
    this.manager_id = manager_id;
  }

  public Long getParent_id() {
    return parent_id;
  }

  public void setParent_id(Long parent_id) {
    this.parent_id = parent_id;
  }
}
